package day1102.demo04;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author wql
 * @version 1.0
 * @date 2022/11/2 15:51
 */

public class WqlAlibabaExecutor {
    public static void main(String[] args) {
        ThreadPoolExecutor executor = new ThreadPoolExecutor(4,6
                ,200, TimeUnit.SECONDS,new LinkedBlockingQueue(80));
        for (int i = 0; i < 70; i++) {
            final  int a=i;
            executor.submit(new Runnable() {
                @Override
                public void run() {
                    System.out.println(Thread.currentThread().getName()+"===="+a);
                }
            });
        }
        executor.shutdown();
    }
}
